<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let arr = [1,2,3,4,5,4,3,2,1]
        let result = [...new Set(arr)]
        let arr2 = [1,2,3,4,5,4,3,2,1]
        let s2 = new Set(arr2)
        console.log(s2)
        console.log(result)
    </script>
</head>
<body>
    
</body>
</html>